package week9;

public class Car1 extends Vehicle implements IPower{
    private String carNumber;
    public Car1(String brand,String color,String carNumber){
        super.setBrand(brand);
        super.setColor(color);
        this.carNumber=carNumber;
    }
    public String getCarNumber(){
        return carNumber;
    }
    public void setCarNumber(String carNumber){
        this.carNumber=carNumber;
    }
    @Override
    public void run(){
        System.out.println("正在开"+super.getColor()+"色的"+super.getBrand()+"汽车，车牌号："+this.carNumber);
        this.power();
    }
    @Override
    public void power(){
        System.out.println("——电动车通过充电补充动力");
    }
}
